package com.liuym.classes.service;

import com.liuym.classes.repository.model.bo.ClassBO;
import com.liuym.classes.repository.model.bo.ClassScoreBatchBO;
import com.liuym.common.exception.ClassException;

import java.util.List;
import java.util.Map;

/**
 * @author LiuYiMing
 * @date 2018/10/25 17:22
 * @describe：
 */
public interface ClassService {
    /**
     * 获得所有班级
     *
     * @return
     */
    List<ClassBO> getAllClass() throws ClassException;

    /**
     * 根据班号获得班级信息
     *
     * @param classNumber
     * @return
     */
    ClassBO getClassByNumber(long classNumber) throws ClassException;

    /**
     * 获得所有年级
     *
     * @return
     */
    List<Integer> getAllYear() throws ClassException;

    /**
     * 删除班级
     *
     * @param classNumber
     */
    int deleteClass(long classNumber) throws ClassException;

    /**
     * 更新班级
     *
     * @param classBO
     */
    int updateClass(ClassBO classBO) throws ClassException;


    /**
     * 添加班级
     *
     * @param classBO
     */
    int addClass(ClassBO classBO) throws ClassException;

    /**
     * 批量添加学生信息
     *
     * @param classBOList
     * @return
     * @throws ClassException
     */
    Map<String, Object> addClassList(List<ClassBO> classBOList) throws ClassException;

    /**
     * 更新班级分数
     *
     * @param score
     * @param classNumber
     * @return
     * @throws ClassException
     */
    int updateScoreByClassNumber(int score, long classNumber) throws ClassException;

    /**
     * 批量更新班级分数
     *
     * @param classScoreBatchBOList
     * @return
     * @throws ClassException
     */
    int updateScoreByClassNumberBatch(List<ClassScoreBatchBO> classScoreBatchBOList) throws ClassException;

    /**
     * 更新班级分数为80
     *
     * @return
     */
    int updateClassScoreTo80() throws ClassException;
    /* *//**
     *
     * @param keyWord
     * @return
     *//*
    List<ClassBO> getByNumber(String keyWord);

    List<ClassBO> getByName(String keyWord);*/
}
